Skip to content

fix: name speedPriority in its validation error - #1149

Open
sarankumar1325 wants to merge 4 commits into
modelcontextprotocol:mainfrom
sarankumar1325:fix/speed-priority-message
Open

sarankumar1325 wants to merge 4 commits into
modelcontextprotocol:mainfrom
sarankumar1325:fix/speed-priority-message

Conversation

@sarankumar1325

Copy link
Copy Markdown

Fixes #1081

ModelPreferences checks speedPriority against the 0.0..1.0 range, but the error message names costPriority (it was copied from the check above). A caller who passes a bad speedPriority is told to fix the wrong field.

Changes:

  • The speedPriority check now says speedPriority must be in 0.0 <= x <= 1.0 value range.
  • should reject ModelPreferences with invalid priority now checks the message for all three priorities, not just the exception type. The speedPriority assertion fails without the fix.

Tests: ./gradlew :kotlin-sdk-core:jvmTest :kotlin-sdk-core:ktlintCheck :kotlin-sdk-core:detekt passes.

Copilot AI balanced review requested due to automatic review settings October 31, 2026 15:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-31T15:35:34.191139Z
We couldn’t complete this review. Comment @codex review to try again.
60a8985 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jetbrains-air jetbrains-air Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch — this fixes the mislabeled message and locks it in with a test, so it looks good to merge.

Produced by Air Automations. Name: Code review / Run: https://air.jetbrains.cloud/org/05cf1a7f-6ab5-713b-abd3-29d0c8a05e2d/automations/409567ec-d3a7-40ac-ba95-8518ec577ac2?run=946e69d3-54fa-4f0d-bd34-53ebd0201f7a

Copilot AI balanced review requested due to automatic review settings November 9, 2026 18:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@jetbrains-air jetbrains-air Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…message

Signed-off-by: sarankumar1325 <120080287+sarankumar1325@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 11, 2026 02:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Copilot AI balanced review requested due to automatic review settings November 18, 2026 04:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ModelPreferences reports an invalid speedPriority as costPriority

2 participants